home *** CD-ROM | disk | FTP | other *** search
- Path: sundog.tiac.net!usenet
- From: Darius Taghavy <dart@ycrdi.com>
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Plugs Ins
- Date: Mon, 11 Mar 1996 18:49:42 -0500
- Organization: The Internet Access Company
- Message-ID: <3144BC16.2C80@ycrdi.com>
- References: <Pine.SOL.3.91.960307160455.27918A@sirius> <Dnws3v.7o0@cix.compulink.co.uk> <3144821E.794B@dmu.ac.uk>
- NNTP-Posting-Host: gatekeep.ycrdi.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Macintosh; I; PPC)
- CC: dart@ycrdi.com
-
- Timothy Eves wrote:
- > Any way I've checked and found out a way doing this using LoadSeg()
- >
- > A seglist as returned by LoadSeg will has this structure:
- >
- > LONG pad ;aligns the seg to long word boundry
- > LONG size ;How big this segment is
- > APTR next_seg ;The next segment in this seglist.
- > start of code
- > .
- > If you do a load seg you can then jump 3 LongWords into the pointer returned
- > by LoadSeg() and start execution from there.
- >
- > When you write you're code just make sure the 1st hunk of the object file
- > contains you're start code and the 1st code line is a function.
-
- Yes I believe the code has to be *somewhere* in the first hunk, but the first location
- after the SegList header structure does not have to be a function! It could also be
- global data. Since you know the size of your data segment (after all you defined it!),
- you can simply jump over it.
-
- #####################################################################################
- ############## Darius Taghavy ### dart@ycrdi.com ####################################
- #####################################################################################
- ### Day Job: Software Engineer, Young Chang R&D Institute (Kurzweil Technology) ###
- ### Night Job: Professional Amiga Songwriting Application Development ###
- ### Past Jobs: Software Engineer for Commodore-Amiga and Ensoniq ###
- #####################################################################################
-